<?php // no direct access
defined( '_JEXEC' ) or die( 'Restricted access' ); ?>

<div class="top_banner col2"><img alt="Salg af Webshop" src="<?php echo $this->baseurl ?>/templates/mwc/medias/images/banner_ydelser.jpg"></div>
<div class="product" id="main">
  <!-- Begin product infos  -->
  <div class="content_ctn col2">
    <h1 class="main_title"> <span>Salg af Portal</span> <a class="button tilbage_btn" href="index.php?option=com_content&view=article&layout=product&id=2">Tilbage til produkter liste</a> </h1>
    <div id="productContent"> {module produkterportal}
      <div class="product_info_form">
        <div class="box_decor_s5">
          <div class="top_decor"><span></span></div>
          <div class="middle_decor form_ctn">
            <div class="col5 desc_ctn">
              <p class="illus fl_left"><img alt="" src="<?php echo $this->baseurl ?>/templates/mwc/images/icon_info.jpg"></p>
              <p class="desc"> {module produkterportalmessage} </p>
            </div>
            <form method="post" action="<?php echo JRoute::_('index.php'); ?>" id="prdInfoForm">
              <label>Firma/Navn:</label>
              <input type="text" class="text" value="" name="name" id="name">
              <label class="email_input">Email:</label>
              <input type="text" class="text" value="" name="email" id="email">
              <label>Din besked:</label>
              <textarea cols="10" rows="8" name="text" id="text"></textarea>
              <div class="actions"> <a id="sendBtn" class="click_btn" href="javascript:void(0);" onclick="click_send();">Send</a> <a id="resetBtn" class="click_btn" href="javascript:void(0);" onclick="reset_form();">Nulstil</a> </div>
              <input type="submit" name="send" id="send" value="Send" style="display: none;" />
              <input type="hidden" name="option" value="com_content" />
              <input type="hidden" name="view" value="" />
              <input type="hidden" name="id" value="" />
              <input type="hidden" name="task" value="submitprodukterportal" />
              <?php echo JHTML::_( 'form.token' ); ?>
            </form>
          </div>
          <div class="bottom_decor"><span></span></div>
        </div>
      </div>
      <!-- Link buttons-->
      <div class="bottom_link_ctn"> <a href="index.php?option=com_contact&view=contact&id=1&Itemid=15" class="bottom_btn ct_btn">kontakt os for yderligere informationer</a> <a href="index.php?option=com_content&view=article&layout=portalreferencer&id=29&Itemid=11" class="bottom_btn ref_btn"><img alt="Gå til Portal referencer" src="<?php echo $this->baseurl ?>/templates/mwc/images/icon_portal.jpg">Gå til Portal referencer</a> <a href="index.php?option=com_content&view=article&layout=step&id=26&Itemid=3" class="bottom_btn pj_btn">Gå til projekt process</a> </div>
      <!-- /End Link buttons-->
    </div>
  </div>
  <!-- /end product list  -->
</div>
<script language="javascript">
	jQuery(document).ready(function($) {	
				
		jQuery("#prdInfoForm").validate({
			errorPlacement: function(error, element) {			
			},
			invalidHandler: function(form, validator) {
			  var errors = validator.numberOfInvalids();
			  if (errors) {
                $('#alert').html(validator['errorList'][0]['message']);
    			$('#backoverlay').show();
    			$('#show_popup').show();
                $('#f_focus').html(validator['errorList'][0]['element'].name);
				validator['errorList'][0]['element'].focus();
			  } else {
			  }
			},
			rules: {
                name : "required",
                email: {
					required: true,
					email: true
				},
                text: "required"
				
			},
			messages: {
                name: "<?php echo JText::_( 'Firma/Navn skal udfyldes!' ); ?>",
                email: "<?php echo JText::_( 'Email skal udfyldes!' ); ?>",
				text: "<?php echo JText::_( 'Din besked skal udfyldes!' ); ?>"
			}
		});
        close_popup=function(){		
    		var fel=$('#f_focus').html();
            $('#backoverlay').hide();
    		$('#show_popup').hide();
    		$('#' + fel ).focus();
      };
      reset_form=function(){
            jQuery('#prdInfoForm')[0].reset()
      };
      click_send=function(){
            document.getElementById('send').click();
      }  
	});
</script>